﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConnectionObjects
{
    [Serializable]
    public class OutConnectionObject
    {
        private Object m_RetVal = null;
        private string m_OptionalMessage = null;
        private string m_ExceptionMessage = null;

        public OutConnectionObject() { }

        public bool IsErrorOccured()
        {
            return m_ExceptionMessage != null;
        }

        public bool IsHaveRetVal()
        {
            return m_RetVal != null;
        }

        public bool IsHaveOptionalMessage()
        {
            return m_OptionalMessage != null;
        }

        public Object RetVal
        {
            get { return m_RetVal; }
            set { m_RetVal = value; }
        }

        public string OptionalMessage
        {
            get { return m_OptionalMessage; }
            set { m_OptionalMessage = value; }
        }

        public string ExceptionMessage
        {
            get { return m_ExceptionMessage; }
            set { m_ExceptionMessage = value; }
        }
    }
}
